// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   MultipleCategorySeries.java

package org.achartengine.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

// Referenced classes of package org.achartengine.model:
//			XYSeries

public class MultipleCategorySeries
	implements Serializable
{

	private String mTitle;
	private List mCategories;
	private List mTitles;
	private List mValues;

	public MultipleCategorySeries(String s)
	{
		mCategories = new ArrayList();
		mTitles = new ArrayList();
		mValues = new ArrayList();
		mTitle = s;
	}

	public void add(String as[], double ad[])
	{
		add((new StringBuilder()).append(mCategories.size()).append("").toString(), as, ad);
	}

	public void add(String s, String as[], double ad[])
	{
		mCategories.add(s);
		mTitles.add(as);
		mValues.add(ad);
	}

	public void remove(int i)
	{
		mCategories.remove(i);
		mTitles.remove(i);
		mValues.remove(i);
	}

	public void clear()
	{
		mCategories.clear();
		mTitles.clear();
		mValues.clear();
	}

	public double[] getValues(int i)
	{
		return (double[])mValues.get(i);
	}

	public String getCategory(int i)
	{
		return (String)mCategories.get(i);
	}

	public int getCategoriesCount()
	{
		return mCategories.size();
	}

	public int getItemCount(int i)
	{
		return ((double[])mValues.get(i)).length;
	}

	public String[] getTitles(int i)
	{
		return (String[])mTitles.get(i);
	}

	public XYSeries toXYSeries()
	{
		XYSeries xyseries = new XYSeries(mTitle);
		return xyseries;
	}
}
